<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

SessionID:<%= session.getId()%><br/><br/>

IsNew:<%= session.isNew()%><br/><br/>

MaxInactiveInterval:<%= session.getMaxInactiveInterval()%><br/><br/>

创建时间:<%= session.getCreationTime()%><br/><br/>

上次访问时间:<%= session.getLastAccessedTime()%><br/><br/>

<%
    Object username = session.getAttribute("username");
    if (username == null) {
        username = "";
    }
%>

<form action="hello.jsp" method="post">
    username:<input type="text" name="username" value="<%= username%>"/>
    <input type="submit" value="提交"/>
</form>

</body>
</html>
